(1) Field of the Invention
The invention relates to a system in which one or more devices share physical memory with the operating system. More specifically, the invention relates to dynamically sizing the amount of memory dedicated to a device other than the operating system.
(2) Related Art
Computer support for graphics over the years have varied substantially. The bulk of graphic support has been external to the host processor and its memory, usually taking the form of a graphics controller either on an I/O card inserted into a slot in an I/O bus or soldered on the motherboard, but still electrically connected to the I/O bus. The graphics controller subsystem typically also includes a frame buffer which may be made from a block of any standard memory type, e.g., DRAM, VRAM, SRAM, etc., which is used to hold images to be output to a display device. The host processor then had unlimited use through a memory controller of physical memory associated with the system. Such physical memory is usually composed of dynamic random access memory (DRAM). Current frame buffers are typically in the range of half a megabyte to four megabytes in length The memory used in the dedicated frame buffer increases the cost of the system proportional to frame buffer size. Significantly, changing the size of the frame buffer requires physically opening the box and installing additional memory units. Thus, resolution and number of colors of graphics is limited by the size of the installed frame buffer.
FIG. 1 shows a typical prior art system. CPU 1 is connected to a bridge 3 by CPU bus 2. The chipset 3 contains a memory controller, a bridge, and an arbitration unit which determines whether addresses received should be forwarded to system memory 4 via the memory controller or down to an I/O bus 8 via the bridge. I/O buses have a number of slots, and the I/O address space is allocated to various slots. In this case, graphics controller 5 occupies one slot on I/O bus 8. The remaining slots on I/O bus 8 are not shown. When the chipset 3 forwards an address to I/O bus 8 which graphics controller 5 recognizes as one of the addresses assigned to it, graphics controller 5 claims a transaction and begins processing. The transaction may cause the graphics controller 5 to fill the frame buffer 6 with data to be displayed on display 7. The graphics controller 5 and frame buffer 6 may be on a single add-in card, or one or both may be attached directly to a motherboard. Alternatively, if the CPU sends the chip set an address recognized to be within system memory 4, the memory controller in the chipset 3 accesses the system memory directly. A system shown in FIG. 1 is well known in the art and is appropriately handled by all standard operating systems.
Every system has an operating system which is responsible for controlling the allocation and usage of hardware resources such as memory, central processing unit time, disk space, and peripheral devices. Among the popular operating systems are MS-DOS, UNIX, OS/2, Windows, and many others. At initial start-up, the basic input/output system (BIOS) initializes the system and configures it for the desired mode of operation. The BIOS then passes control to the operating system. Once the O/S has control, it can ask for parameters from BIOS regarding system configuration including memory available and other features important to the operating system's allocation and control functions. While some operating systems accept the parameters passed by BIOS as given, other operating systems check at least some of the parameters on their own to insure that they have the correct values. Memory size is a parameter which is commonly checked by some currently existing operating systems. An operating system checks the memory size by writing to the memory at some increment, usually one megabyte, and then reading back the previously written address. Once an address is written and the read returns no value, the operating system presumes it has reached the top of the memory. This process is known as memory sizing.
There is at least one vestige of prior art systems that require special accommodations today. Early PC architecture designated addresses directed to the address range A000-C0005 to be graphical transactions. Thus, such addressed transactions were forwarded to the I/O bus for graphical processing by the graphics controller. Physical memory has since enveloped this address range, but for compatibility reasons, it is treated as a hole in system memory with all accesses to this range being forwarded to the I/O bus.
Some prior art work stations have successfully eliminated the additional cost of a stand alone frame buffer memory unit by employing a portion of the physical system memory as the frame buffer. Unfortunately, these prior art systems were not designed to allow the use of arbitrary operating systems. These systems require that the operating system know that a portion of the physical memory had been allocated to the frame buffer so that it would not try to access that portion of physical memory or allocate it to another function. Thus, such allocation of physical memory to a frame buffer is impractical in an environment such as the personal computer where arbitrary operating systems are likely to be employed. Moreover, these systems fail to cure the disadvantage of having a fixed size frame buffer since changes in size necessitate changes in the operating system. Moreover, since the size is fixed, the resolution of the graphical output is limited and in the event that a large fixed size frame buffer is provided, inefficient use of memory results any time the resolution of the graphics used does not employ the entire frame buffer.
Therefore, it would be desirable to be able to dynamically allocate physical memory to a device other than the operating system while maintaining the flexibility of the system to execute any arbitrary operating systems supported. Moreover, it would be desirable to provide graphical support on the motherboard without requiring the expense of a corresponding add-in dedicated memory.